package com.cy.aircompressor.utils;

import com.cy.aircompressor.main.home.fragment.v1.MainContentFragment;
import com.cy.aircompressor.main.home.fragment.v2.MainContentFragmentV2;
import com.cy.aircompressor.main.welcome.fragment.LoginFragment;
import com.net.model.livedatas.LiveDataBus;

public class JumpPageUtils {

    public static void jumpLogin() {
        LiveDataBus.get().with(Jump.jumpKey, Jump.class).post(getJumpByClass(LoginFragment.class));
    }

    public static void jumpMain() {
        LiveDataBus.get().with(Jump.jumpKey, Jump.class).post(getJumpByClass(MainContentFragmentV2.class));
    }


    private static Jump getJumpByClass(Class clz) {
        return new Jump(clz.getSimpleName());
    }
}
